﻿@using Orchard.Indexing
@using Orchard.Utility.Extensions
@model Orchard.Indexing.Settings.TypeIndexing
@{
    var indexProvider = WorkContext.Resolve<IIndexManager>().GetSearchIndexProvider();
    
}

@if (indexProvider != null) {
    <fieldset>
        <legend>@T("Index this content type in:")</legend>
        @{ var i = 0;}
        @foreach (var index in indexProvider.List()) {
        <div>
            <input type="checkbox" value="@index" class="check-box" id="@Html.FieldIdFor(m => m.List[i])" name="@Html.FieldNameFor(m => m.List)" checked="@(Model.List.Contains(index))"/>
            <label for="@Html.FieldIdFor(m => m.List[i])" class="forcheckbox">@index</label>
        </div>
        i++;
        }
    </fieldset>
}